﻿<?xml version="1.0" encoding="utf-8"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="PurchaseSales.Manage" namespace="PurchaseSales.Manage.Model.Entities">
  <class name="PurchaseCommodity" table="PurchaseCommodity" lazy="true">
    <id name="Id" column="Id" type="Guid">
      <generator class="guid.comb" />
    </id>
    <property type="string"  name="Number" column="[Number]" not-null="1" unique="1"/>
    <property type="DateTime" name="PurchaseDate" column="[PurchaseDate]"/>
    <property type="double" name="Count" column="[Count]" />
    <property type="Decimal" name="Totalprice" column="[totalprice]" />
    <property type="string" name="Remark" column="[Remark]" />
    
    
    <many-to-one name="Supplier" column="Supplier"  class="Supplier" />
    <many-to-one name="Commodity" column="Commodity"  class="Commodity" />
  </class>
</hibernate-mapping>